package tx.oopa.circuit.view;

import java.awt.Graphics;
import java.awt.Point;
import java.util.HashMap;
import java.util.Map;

import javax.swing.JComponent;

import tx.oopa.circuit.node.AbstractNode;

public abstract class NodeComponentDecorator extends JComponent {

    /**
     * Default serial version UID
     */
    private static final long serialVersionUID = 1L;

    protected static final Map<AbstractNode, Point> MAP = new HashMap<AbstractNode, Point>();
    protected JComponent component;

    public NodeComponentDecorator(JComponent component) {
        if(component == null) {
            throw new IllegalArgumentException("Component cannot be null.");
        }
        this.component = component;
    }

    @Override
    public void paint(Graphics g) {
        this.component.paint(g);
    }

}
